\documentclass[usenatbib,usegraphicx,letterpaper]{mn2e}
\usepackage[totalwidth=480pt,totalheight=680pt]{geometry}

\usepackage{amssymb}
\usepackage{epsfig}
\usepackage{amsmath}
\usepackage{color}
\usepackage{epsfig}  
\usepackage{graphicx}  
 \usepackage{rotating}
%\usepackage{hyperref}

%-------- journals
\newcommand{\araa}{ARAA~}
\newcommand{\apj}{ApJ~}
\newcommand{\apjl}{ApJL~}
\newcommand{\apjs}{ApJS~}
\newcommand{\mnras}{MNRAS~}
\newcommand{\nat}{Nature~}
\newcommand{\physrep}{Phys. Rep.~}
\newcommand{\aj}{AJ~}

%\usepackage{natbib} 
\bibliographystyle{mn2e} 
\newcounter{address}
\newcommand{\latin}[1]{{#1}} 
\newcommand{\unit}[1]{\mathrm{#1}}
\newcommand{\di}{\mathrm{d}} 
\newcommand{\ie}{\latin{i.e.}}
\newcommand{\eg}{\latin{e.g.}}  
\newcommand{\wpp}{w_{\mathrm{p}}}
\newcommand{\wprp}{w_{\mathrm{p}}(r_{\mathrm{p}})}
\newcommand{\rp}{(r_{\mathrm{p}})} 
\newcommand{\rrf}{r_\mathrm{f}}
\newcommand{\ttdyn}{t_\mathrm{dyn}}
\newcommand{\nnLRG}{n_\mathrm{LRG}}
\newcommand{\GammaLRG}{\Gamma_\mathrm{LRG}}
\newcommand{\NNf}{N_\mathrm{f}} 
\newcommand{\Gpc}{\unit{Gpc}}
\newcommand{\Mpc}{\unit{Mpc}} 
\newcommand{\kpc}{\unit{kpc}}
\newcommand{\Gyr}{\unit{Gyr}} 
\newcommand{\Myr}{\unit{Myr}}
\newcommand{\km}{\unit{km}} 
\newcommand{\kms}{\unit{km \ s^{-1}}}
\newcommand{\s}{\unit{s}} 
\newcommand{\arcs}{\unit{arcsec}}
\newcommand{\Lbox}{L_{\mathrm{box}}}
\newcommand{\hmpc}{h^{-1}\mathrm{Mpc}}
\newcommand{\hmpcvol}{h^{-3}\mathrm{Mpc^{3}}}
\newcommand{\hkpc}{h^{-1}\mathrm{kpc}}
\newcommand{\hMsun}{h^{-1}M_{\odot}} 
\newcommand{\hhMsun}{h^{-2}M_{\odot}} 
\newcommand{\Omegastar}{\Omega_{\ast}}
\newcommand{\alfa}{\mathrm{\alpha}} 
\newcommand{\Mmin}{M_\mathrm{min}}
\newcommand{\Mvir}{M_\mathrm{vir}} 
\newcommand{\Mhost}{M_\mathrm{host}} 
\newcommand{\Mstar}{M_{\ast}}
\newcommand{\Mstarzero}{M_{\ast , 0}}
\newcommand{\Lstar}{L^{\ast}}
\newcommand{\LBCG}{L_{\mathrm{BCG}}}
\newcommand{\MDM}{M^\mathrm{dm}} 
\newcommand{\Rvir}{R_\mathrm{vir}}
\newcommand{\Rvirsub}{R_\mathrm{vir,sub}}
\newcommand{\meansat}{N_\mathrm{sat}}
\newcommand{\Mzero}{\mathrm{M}_\mathrm{0}} 
\newcommand{\Mone}{M_\mathrm{1}}
\newcommand{\Cgal}{c_\mathrm{gal}}
\newcommand{\onehalo}{\mathrm{1halo}}
\newcommand{\twohalo}{\mathrm{2halo}}
\newcommand{\expon}{\mathrm{exp}} 
\newcommand{\sat}{\mathrm{sat}}
\newcommand{\vir}{_\mathrm{vir}} 
\newcommand{\xir}{\xi(r)}
\newcommand{\Mstell}{M_{\mathrm{stellar}}}
\newcommand{\Msub}{M_{\mathrm{sub}}} 
\newcommand{\Msun}{M_{\odot}}
\newcommand{\Minfl}{M_{\mathrm{infl}}} 
\newcommand{\rinfl}{r_{\mathrm{infl}}} 
\newcommand{\Mprime}{M^{'}}
\newcommand{\rprime}{r'}
\newcommand{\ngal}{\bar{n}_{\mathrm{g}}}
\newcommand{\nbar}{\bar{n}}
\newcommand{\fsat}{f_\mathrm{sat}}
\newcommand{\fihlbhg}{f_\mathrm{IHL+BHG}}
\newcommand{\fihl}{f_\mathrm{IHL}}
\newcommand{\pimax}{\pi_\mathrm{max}}
\newcommand{\fDMloss}{f_\mathrm{DM \ loss}}
\newcommand{\vcir}{\mathrm{V}_\mathrm{cir}}
\newcommand{\vmax}{\mathrm{V}_\mathrm{max}}
\newcommand{\vmaxacc}{\mathrm{V}_\mathrm{max}^\mathrm{acc}}
\newcommand{\vmaxfin}{\mathrm{V}_\mathrm{max}^\mathrm{fin}}
\newcommand{\vpeak}{\mathrm{V}_\mathrm{peak}}
\newcommand{\vzeropeak}{\mathrm{V}_\mathrm{0,peak}}
\newcommand{\vacc}{\mathrm{V}_\mathrm{acc}}
\newcommand{\Mpeak}{\mathrm{M}_\mathrm{peak}}
\newcommand{\Macc}{\mathrm{M}_\mathrm{acc}}
\newcommand{\Mobs}{\mathrm{M}_\mathrm{obs}}
\newcommand{\Mzeropeak}{\mathrm{M}_\mathrm{0,peak}}
\newcommand{\wtheta}{w(\theta)}

\newcommand{\lstar}{L_{*}}
%%% age matching %%%
\newcommand{\mchar}{M_{\mathrm{char}}}
\newcommand{\mhost}{M_{\mathrm{host}}}

\newcommand{\zshock}{z_{\mathrm{shock}}}
\newcommand{\zquench}{z_{\mathrm{quench}}}
\newcommand{\zform}{z_{\mathrm{form}}}
\newcommand{\zacc}{z_{\mathrm{acc}}}
\newcommand{\zchar}{z_{\mathrm{char}}}
\newcommand{\zstarve}{z_{\mathrm{starve}}}

\newcommand{\tdelay}{t_{\mathrm{delay}}}

%%% halo model  %%%

\newcommand{\bh}{b_{\mathrm{h}}}
\newcommand{\dndmvir}{\frac{\mathrm{d}n_{\mathrm{h}}}{M_{\mathrm{vir}}}}
\newcommand{\dndmvirprime}{\frac{\mathrm{d}n_{\mathrm{h}}}{M'_{\mathrm{vir}}}}
\newcommand{\navg}[1]{\langle N_{\mathrm{#1}} \rangle}
\newcommand{\navgmhost}[1]{\langle N_{\mathrm{#1}}(M_{\mathrm{host}}) \rangle}
\newcommand{\nredavg}[1]{\langle N^{\mathrm{red}}_{\mathrm{#1}} \rangle}
\newcommand{\nredavgmhost}[1]{\langle N^{\mathrm{red}}_{\mathrm{#1}}(M_{\mathrm{host}}) \rangle}
\newcommand{\nblueavg}[1]{\langle N^{\mathrm{blue}}_{\mathrm{#1}} \rangle}
\newcommand{\nblueavgmhost}[1]{\langle N^{\mathrm{blue}}_{\mathrm{#1}}(M_{\mathrm{host}}) \rangle}
\newcommand{\Nsat}{N_\mathrm{sat}}
\newcommand{\Ncen}{N_\mathrm{cen}}

\newcommand{\Ngal}{\langle N_{\mathrm{gal}}\rangle}
\newcommand{\Ngalmvir}{\langle N_{\mathrm{gal}}(M_{\mathrm{vir}})\rangle}
\newcommand{\Ngalmvirzform}{\langle N_{\mathrm{gal}}(M_{\mathrm{vir}},\zform)\rangle}
\newcommand{\Ngalmvirprimezformprime}{\langle N_{\mathrm{gal}}(M'_{\mathrm{vir}},\zform')\rangle}

\newcommand{\Ngalthresh}{\langle N^{>\mathrm{L}}_{\mathrm{gal}}\rangle}
\newcommand{\Ngalthreshmvir}{\langle N^{>\mathrm{L}}_{\mathrm{gal}}(M_{\mathrm{vir}})\rangle}
\newcommand{\Ngalthreshmvirzform}{\langle N^{>\mathrm{L}}_{\mathrm{gal}}(M_{\mathrm{vir}},\zform)\rangle}
\newcommand{\Ngalthreshmvirprimezformprime}{\langle N^{>\mathrm{L}}_{\mathrm{gal}}(M'_{\mathrm{vir}},\zform')\rangle}


\newcommand{\veff}{V_{\mathrm{eff}}}
\newcommand{\Psdss}{P_{\mathrm{SDSS}} ( g-r | L_r)}
\newcommand{\Predseq}{P_{\mathrm{red}} ( c | L )}
\newcommand{\Pblueseq}{P_{\mathrm{blue}} ( c | L )}
\newcommand{\PtotM}{P ( c | L,  M )}
\newcommand{\Ptot}{P ( c | L )}
\newcommand{\Psat}{P_{\mathrm{sat}} ( c | L )}
\newcommand{\Pcen}{P_{\mathrm{cen}} ( c | L )}
\newcommand{\PsatM}{P_{\mathrm{sat}} ( c | L, M )}
\newcommand{\PcenM}{P_{\mathrm{cen}} ( c | L, M )}
\newcommand{\Psdsscen}{P_{\mathrm{SDSS,cen}} ( c | L )}
\newcommand{\Psdsssat}{P_{\mathrm{SDSS,sat}} ( c | L )}
\newcommand{\fblue}{F_{\mathrm{BLUE}} ( L )}
\newcommand{\fcen}{f_{\mathrm{cen}} ( L )}
\newcommand{\MeanColorRedseq}{\bar{c}_{\mathrm{red}} ( L )}
\newcommand{\MeanColorBlueseq}{\bar{c}_{\mathrm{blue}} ( L )}
\newcommand{\MeanColorSat}{\bar{c}_{\mathrm{sat}} ( L )}
\newcommand{\MeanColorCen}{\bar{c}_{\mathrm{cen}} ( L )}
\newcommand{\Sigredseq}{\sigma_{\mathrm{red}} ( L )}
\newcommand{\Sigblueseq}{\sigma_{\mathrm{blue}} ( L )}
\newcommand{\WeightRedSat}{W_{\mathrm{sat}}^{\mathrm{red}} ( L )}
\newcommand{\WeightRedCen}{W_{\mathrm{cen}}^{\mathrm{red}} ( L )}
\newcommand{\WeightBlueSat}{W_{\mathrm{sat}}^{\mathrm{blue}} ( L )}
\newcommand{\WeightBlueCen}{W_{\mathrm{cen}}^{\mathrm{blue}} ( L )}
\newcommand{\PNM}{\mathrm{P}(N \vert M)}
\newcommand{\philm}{\Phi(L|M)}

%--------- Cosmology
\newcommand{\Omegam}{\Omega_{M}}
\newcommand{\Omegab}{\Omega_{b}}
\newcommand{\littleh}{h}
\newcommand{\littlehsq}{h^{2}}
\newcommand{\tilt}{n_{s}}
\newcommand{\sigmaeight}{\sigma_{8}}
\newcommand{\lcdm}{\Lambda\mathrm{CDM}}


\newcommand{\wproj}{w_{\mathrm{p}}}
\newcommand{\rproj}{r_{\mathrm{p}}}

\newcommand{\fq}{F^{\mathrm{sat}}_{\mathrm{q}}}

%%%% Misc %%%
\newcommand{\beq}{\begin{equation}}
\newcommand{\eeq}{\end{equation}}
\newcommand{\beqray}{\begin{eqnarray}}
\newcommand{\eeqray}{\end{eqnarray}}

\newcommand{\ben}{\begin{enumerate}}
\newcommand{\een}{\end{enumerate}}
\newcommand{\bit}{\begin{itemize}}
\newcommand{\eit}{\end{itemize}}

\newcommand{\dd}{\mathrm{d}}


\begin{document}

\title[The Color-Dependent Halo Mass-Stellar Mass Relation]{The Color Dependence of the Galaxy Stellar Mass-Halo Mass Relation}

\author[E.~Blair, A.~P.~Hearin, \& A.~R.~Zentner]
{Elizabeth Blair$^{1}$, 
Andrew P. Hearin$^{2}$, 
Andrew R. Zentner$^{1}$ \vspace*{4pt} \\
  $^1$ Department of Physics and Astronomy \& Pittsburgh Particle physics, Astrophysics and Cosmology Center (PITT PACC),\\
University of Pittsburgh, Pittsburgh, PA 15260; \vspace*{2pt}\\
$^2$ Department of Astronomy, Yale University, P. O. Box 208101, New Haven, CT 06520-8101
}

\maketitle

%%%%%%%%%%%%%%%%%%%%%%%%%%%% ABSTRACT %%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{abstract}

This paper rocks.

\end{abstract}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{keywords}
  cosmology: theory --- dark matter --- galaxies: halos --- galaxies:
  evolution --- galaxies: clustering --- large-scale structure of
  universe
\end{keywords}



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% INTRO %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\section{INTRODUCTION}
\label{sec:intro}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


The statistical properties of dark matter halos at all cosmic epochs in cold dark matter (CDM) cosmologies can be well-predicted by N-body simulations \citep{springel05nb,boylan08,klypin11,angulo12}.Although it is known that the properties of these halos are affected by the behavior of baryons, estimations of halo mass are only affected by the presence of baryons by $\sim 20-30 \%$ \citep{2014arXiv1409.8617S,2013MNRAS.431.1366S,2014arXiv1412.2748S,2014MNRAS.439.2485C,2014MNRAS.442.2641V,2014MNRAS.444.1518V}. Conversely, baryonic behavior is much harder to predict from first principles, making it difficult to correspond predicted halo properties with observed galaxy properties. \textcolor{red}{do i need to cite this, since I address attempts to do it in the next paragraph?} Additionally, predictions from simulations have the additional advantage that they can keep track of the history of any given dark matter halo. A prediction of the baryonic properties of halos can take advantage of this property and produce evolutionary information. However, it is known that galaxies form in the potential wells of dark matter halos \citep{white78,fall80}, implying that there should be a strong correlation between halo properties and galaxy properties.

Many studies have attempted to link halo and galaxy properties by simulating baryonic matter alongside dark-matter-only N-body simulations, either using fully hydrodynamic simulations \citep{katz96,springel03,keres05,crain09,schaye10,oppenheimer10} or semi-analytic models \citep{kauffmann99,springel01,hatton03,springelsam05,kang05,croton06,bower06,guo11}. While this approach has been fruitful, there is still much room for improvement, and both sets of models still have a number of issues, including many unconstrained parameters corresponding to unknown physics.

%expand issues?

Another class of approaches to this problem involves assigning galaxies to halos using a simple empirical model with adjustable parameters, and then constraining that model with actual observational data. The simplest version of this is called abundance matching, where the relation between some halo property, such as virial mass, and some galaxy property, such as stellar mass, is assumed to be monotonic \citep{vale04,conroy06,shankar06,vale06,moster10,guo10,behroozi10,moster13}. All galaxies and all halos are then matched according to this assumption.

A popular variation of this approach is to assume a functional form for the relationship between those properties (the stellar-to-halo mass relation (SHM)), and then constrain the parameters of that functional form. These functional forms are both theoretically and empirically motivated. An additional advantage of this approach is that a scatter can be easily added to the galaxy-halo relationship. Further, this technique can be extended and improved by assuming that these parameters evolve with cosmic age. Additionally, this modeling can be combined with merger trees to calculate star formation rates.

It is well-known from observational studies that galaxies exhibit a star-formation bimodality, with most galaxies falling clearly into ``star-forming" (also known as ``active" or ``blue") or ``quenched'' (also known as ``passive" or ``red") categories \citep{strateva01,blanton03,kauffmann03,madgwick03}. Star-forming galaxies tend to have disks (spiral galaxies) and lots of gas, whereas quenched galaxies have older stellar populations and tend to be ellipsoidal. Questions about how, when, and why galaxies ``quench" are still unanswered, and although there are many possible routes from active to passive, it is unknown which of those routes are important.

Some of proposed quenching processes include mergers, active galactic nucleus (AGN) feedback, and shock heating of large quantities of infalling gas \citep{2006MNRAS.365...11C,2006MNRAS.370..645B,2006MNRAS.368....2D,2006MNRAS.370.1651C,2008ApJS..175..390H}. Quenching in satellite galaxies can also be triggered by stripping of gas and tidal effects from neighbor galaxies \citep{1972ApJ...176....1G,1998ApJ...495..139M,2000ApJ...540..113B}. In previous decades it was assumed that this stripping happened immediately as galaxies became satellites, but this has been found to produce satellites that are too red overall when compared to observations; therefore, the reality of how this gas stripping happens must be more complex.

%note to self re: citations: I used the intro from 1209.3306 to help with the last paragraph

This paper is organized as follows. In section \ref{sec:data}, we describe the observational and simulation data that were used in this study. In section \ref{sec:modeling}, we describe the details of a model which assigns stellar masses and color categorization to dark matter halos based on mass. In section \ref{sec:results}, we present the results of our study, and show that our model can reproduce observational data. Finally in section \ref{sec:discussion}, we discuss the implications of our model.


%---------------------------------------------------------------------------------------------------------------------------
\section{Numerical Simulations and Observational Data}
\label{sec:data}
%======================================================================


%-------------------------------------------------------
\subsection{Numerical Simulations}
\label{sub:sims}
%-------------------------------------------------------

For this study we use mock halo catalogs from the collisionless N-body Bolshoi simulation. The Bolshoi simulation uses a $\Lambda$CDM (dark energy with cold dark matter) cosmology, with parameters $h=0.70$, $\Omegam=0.27$, $n=0.95$, $\sigma_8=0.82$, and $\Omegab=0.0469$, which are consistent with WMAP7. Bolshoi was run in a cubic volume $250 h^{-1} \text{Mpc}$ on a side, with $~8$ billion particles, from $z=80$ to today. The simulation uses the Adaptive Refinement Tree Code (ART). The Bolshoi data is available at \texttt{www.multidark.org}. 

%ART citation Kravtsov et al. 1997;Gottloeber & Klypin 2008

%Should we say something about the choice of Bolshoi?

We have used the \texttt{ROCKSTAR} halo finder to identify halos and subhalos in the simulation. The \texttt{ROCKSTAR} halo finder of resolves halos down to $V_\text{max} \sim 55 \text{km s}^{-1}$. We use a \texttt{ROCKSTAR}-generated catalog for the $a=0.76630$ snapshot ($z=0.305$), which is publicly available at \texttt{www.slac.stanford.edu/\~{}behroozi/Bolshoi\_Catalogs}. Halo masses are calculated using spherical overdensities via the redshift-dependent virial overdensity criterion given by Bryan \& Norman (1998) [[cite]]. In this paper, halos and subhalos are treated the same.

%--------------------------------------------------------------
\subsection{Observational Data}
\label{sub:data}
%--------------------------------------------------------------


For our observed stellar mass function (SMF) of both active and passive galaxies, we use PRIMUS (the PRism MUlti-object Survey). This survey measured spectra and spectroscopic redshifts for 120,000 galaxies between $z=0$ and $z=1.2$, which form a statistically complete sample in seven extragalactic deep fields, including five samples for which there is spectroscopic data from the \textit{Spitzer} Wide-area Infrared Extragalactic Survey (SWIRE) or from the Galaxy Evolution Explorer (GALEX). Information on the PRIMUS survey itself can be found in Coil et al 2011, and information on the data processing can be found in Cool et al. 2013. We use separate active and passive stellar mass functions (SMFs) constructed from PRIMUS and \textit{Spitzer}/GALEX as presented in Moustakas et al. 2013. In this paper, we use the SMF measured between $z=0.2$ and $z=0.3$.



%---------------------------------------------------------------
\section{Modeling}
\label{sec:modeling}
%---------------------------------------------------------------

%--------------------------------------------------------------
\subsection{Stellar-to-Halo Mass Relation}
\label{sub:shm}
%--------------------------------------------------------------

We adopt the SHM functional form first used by \cite{moster10}, similar to that used in \cite{yang03}, \begin{equation}
\frac{m}{M} = 2N\bigg[\bigg(\frac{M}{M_1}\bigg)^{-\beta} + \bigg(\frac{M}{M_1}\bigg)^{\gamma}\bigg]^{-1}.
\end{equation} In this model, the SHM relationship depends on four parameters: $M_1$ is the characteristic halo mass, $\beta$ and $\gamma$ are respectively the high and low mass slopes, and $N$ is the normalization. An example can be seen in Fig. \ref{shm_motiv}.


\begin{figure}
\includegraphics[width=0.5\textwidth]{shm_motiv}
\caption{The functional form used for the stellar-to-halo mass relation. \textit{Above:} Stellar mass vs. halo mass. $1+\beta$ is the low-mass slope, $1-\gamma$ is the high-mass slope, $M_1$ is the characteristic halo mass where the slope changes, and $N\cdot M_1$ is the stellar mass at $M_1$. \textit{Below:} The same relationship, expressed as the ratio of stellar to halo mass (i.e. stellar mass fraction) vs. halo mass. The low- and high-mass slopes are $\beta$ and $-\gamma$, respectively, $M_1$ is the characteristic halo mass, and $N$ is the stellar mass fraction at that halo mass. The horizontal dotted line represents the value of the universal baryon fraction, the maximum physically allowable value of this ratio (this value would represent a situation where all baryons are in stars and there is no gas or dust.)}
\label{shm_motiv}
\end{figure}

%\begin{figure}
%\includegraphics[width=0.5\textwidth]{shm_motiv_2}
%\caption{The functional form used for the stellar-to-halo mass relation, this time expressed with the ratio between stellar mass and halo mass. The horizontal dotted line represents the value of the universal baryon fraction, the maximum physically allowable value of this ratio (this value would represent a situation where all baryons are in stars and there is no gas or dust.)}
%\label{shm_motiv_2}
%\end{figure}
%Does this figure need to make it more clear that N is not the maximum?

This functional form is both observationally and theoretically motivated. \cite{moster10} showed that a constant SHM produces too many galaxies at both the high- and low-mass ends; a ratio that drops off at high and low masses is therefore required. Additionally, it is well-known that cold gas is required to form stars. For galaxies with large mass, the potential well is deep, and the gas may not have cooled enough to form stars over a Hubble time, after being heated by falling into the gravitational potential well. At the same time, for smaller galaxies with a shallower potential well, the gas may more easily be ejected from the galaxy by phenomena such as supernovae.


\subsection{Active Fraction}

Because red galaxies are ``quenched," that is, no longer forming stars, and blue galaxies are not, and because quenched galaxies have been in place for a large fraction of the age of the universe, it would not be surprising to find that stellar mass is linked with color. To investigate this, we want to use separate observationally derived SMFs for each of these two populations to see if stellar mass and color can be modeled simultaneously as functions of halo mass, in order to constrain the relationship between halo mass and whether a galaxy is active or passive. 

{\bf [ARZ: You need to describe the cluster catalog and the SDSS sample that the catalog is extracted from. I assume it is 
the SDSS DR7 Spectroscopic Main Sample. APH will know as I assume that you are using a catalog that he gave you. You 
should ask APH for details on the catalog or at least for him to point you to a paper where he describes the details. It may be 
his Hearin et al. 2012 paper on abundance matching, but I'm not entirely sure and I don't want to lead you astray.]}


In Fig. \ref{pb_motiv}, we show the fraction of SDSS galaxy clusters that are active (that is, where the specific star formation rate is at least $10^{-11} \Gyr^{-1}$), in bins of halo mass. These halo masses are assigned via abundance matching. We find that the fraction of galaxies that are active is a 
declining function of halo mass that is consistent with an exponential decline of the form,
%
\begin{equation}
P_\mathrm{active}(M) = p_{c}e^{p_\mathrm{M}-M}
\label{eq:expform}
\end{equation}
%
where $p_\mathrm{M}$ is a parameter that is set to $p_\mathrm{M} = 11.997$ in Fig.~\ref{pb_motiv}. We attempt to fit an 
exponential function of the form of Eq.~(\ref{eq:expform}), with free parameter $p_\mathrm{M}$, for the probability that a halo of a 
given mass will host an active galaxy.

%----------------------------------------------------------------------------------------------------------------------------------
\begin{figure}
\includegraphics[width=0.5\textwidth]{pb_motiv}
\caption{
{\bf [ARZ: The first line of a caption should be some sort of title or introduction to the figure and is not required to be a complete sentence. For example, 
one might choose ``Active galaxy fractions in SDSS groups" for the first line of this caption. You should specify how the errors are computed. You also need 
to show the best fit parameter of the model. I would actually write the functional form directly in the upper right of the figure as a legend would appear and 
not in that region of the plot the best-fit parameter value.]}
In dark blue, the fraction of galaxies per halo mass bin that are active, with the light blue representing a 95\% confidence interval due to cosmic variance. The halo masses come from an abundance matching, with the corresponding galaxies from an SDSS catalog. The green line shows a fit with our functional form, demonstrating that our functional form can approximate the observed trend \textcolor{red}{}}
\label{pb_motiv}
\end{figure}
%-----------------------------------------------------------------------------------------------------------------------------------

A declining exponential is consistent with contemporary understandings of galaxy formation. The progenitors of massive galaxies form earlier than those of smaller galaxies, and so have more time to form stars and use up their gas, hence should be redder. Additionally, massive galaxies are preferentially found in denser environments, and denser environments have a higher fraction of quenched galaxies.

We will then assign each halo a fraction of a red galaxy and a fraction of a blue galaxy. For instance, if we predict that a halo has a 30\% probability of hosting active star formation, then we will add 0.3 to the total count of blue galaxies and 0.7 to the total count of red galaxies in our modeled SMFs. If Eq. \ref{eq:expform} gives a $P_\mathrm{active} > 1$, we set $P_\mathrm{active}$ to 1.

This gives our model a total of 6 tunable parameters.

%--------------------------------------------------------------------------------------------------------------------------------------------
\subsection{Subhalos}
\label{sub:subhalos}
%---------------------------------------------------------------------------------------------------------------------------------------------


We define subhalos as dark matter halos that have been accreted into a larger ``host" halo. For subhalos, we use as the halo mass the mass at the last time the subhalo was its own independent halo, $M_{\mathrm{acc}}$, in order to 
assign the halo a stellar mass and color. This is because when subhalos are accreted, they can experience tidal stripping, which will cause them to lose a lot of dark matter mass without losing much stellar material. Galaxies are much more compact objects that the dark matter halos they live in. Halos that lose their outer layers will still retain most of their stars. Because the outer dark-only material is stripped first, quantities such as virial mass do not appropriately reflect the halo's history for subhalos, where as quantities such as $M_{\mathrm{acc}}$ do.

%--------------------------------------------------------------------------------------------------------------------------------------------------
\section{Results}
\label{sec:results}
%--------------------------------------------------------------------------------------------------------------------------------------------------

{\bf [ARZ: This is getting to be common knowledge, but you probably want to give a citation for MCMC. The number of 
chains is irrelevant. What is relevant is the total number of samples. Make sure that you update your plots with 
the latest data including the runs that you started from the endpoints of the previous chains.]}
We used an MCMC (Markov chain Monte Carlo) technique to constrain our parameters. Seven chains were 
run using the Metropolis algorithm, with a continually-updated correlated multivariate gaussian 
as the proposal distribution. Our likelihood was calculated using the chi squared statistic:
%
\begin{equation}
L = e^{-\chi^2/2}.
\end{equation}
%
$\chi^2$ was computed by comparing mock galaxy catalogs, created by assigning galaxies according to our model to halos in the Bolshoi simulation, against PRIMUS data.
%
\begin{equation}
\chi^2 = \sum^N_{i=1} \left ( \frac{\log( \Phi_\textrm{obs} ) - \log( \Phi_\textrm{model} )}{\sigma_\textrm{obs}} \right )^2
\end{equation}
%
 {\bf [ARZ: Did you ever check the correlation test?
Again, its number of samples that matters, not number of chains.]}

The resulting posterior distribution can be seen in Fig. \ref{triangle}, which shows the marginalized one-dimensional probability distribution for each parameter, as well as the marginalized two-dimensional probability distribution for each pair of parameters. Each of the SHM parameters shows a strong degeneracy with every other SHM parameter, but not with the two $P_\textrm{blue}$ parameters.

The normalization $N$ is positively correlated with the turnover mass $M_1$. If $N$ is higher, then we assign higher mass galaxies to lower-mass halos, whereas raising $M_1$ has the opposite effect, since the low-mass slope, $1+\beta$, of the SHM is less than the high-mass slope, $1-\gamma$. See Fig. \ref{shm_motiv} for reference.

The parameters $N$ and $M_1$ have a negative correlation with $\beta$ and a positive correlation with $\gamma$. Raising $N$ and $M_1$ moves the entire SHM relationship up and to the right. This effect can be partially compensated for by lowering $\beta$ and raising $\gamma$. The parameters $\beta$ and $\gamma$ have a negative correlation with each other, because higher $\beta$ means lower $N$ and $M_1$, which means lower $\gamma$.

The probability coefficient $p_c$, which measures the rate at which $P_\mathrm{blue}$ falls off with halo mass, is negatively correlated with all SHM parameters except $\beta$. Larger values of $p_c$ mean that halos are more likely to be assigned red galaxies at a given halo mass. If $N$ (and $M_1$ and $\gamma$) is greater, then the model is assigning larger galaxies to halos of a given halo mass. Therefore, blue, low-mass galaxies will need to be assigned to higher-mass halos, and $p_c$ will have to be lower.

The mean values of parameters are printed in Table \ref{maxlik}, and the resulting relations are plotted in Figs. \ref{SHM} and \ref{Pb}. Fig. \ref{SHM}, which shows the SHM, should be compared against the bottom panel of Fig. \ref{shm_motiv}, and Fig. \ref{Pb}, which shows the probability of a halo hosting a blue galaxy, should be compared against Fig. \ref{pb_motiv}. In Fig. \ref{SHM}, the reader can see that while the data provide tight constraints on the SHM relation in the low mass regime, the high-mass regime has much larger errors. Traditionally, the stellar-to-halo-mass ratio plotted in this figure is expected to peak near $M_1$, the data used here do not rule out a monotonically increasing function, which would mean that larger and larger fractions of baryonic mass in halos become stars - at large enough mass, though, this situation would be unphysical, as that fraction would grow greater than unity. The active fraction, too, has somewhat tighter constraints in the low-mass regime.

The stellar mass function predicted by the maximum likelihood model is plotted in Figs. \ref{SMF} and \ref{totSMF}, and compared with the observational data used to provide constraints. In Fig. \ref{totSMF}, the observational active and passive SMFs are added together and shown for comparison. For both active and passive SMFs, there is one high-mass point which has very large errors. In both cases, the statistical significance of the other points overwhelms this point, and the model misses that point.

\subsection{Comparison to Previous Work}

It is worth noting that the values found for the first four parameters ($M_1$, $N$, $\beta$, and $\gamma$) differ significantly from those found in \cite{moster10}. However, they use the Millennium suite of simulations \citep{springel05nb} and SDSS observational data, and we have used Bolshoi and PRIMUS. Repeating our simulation with Millennium simulations significantly improves the situation. 
However, our prescription relies on the mass of subhalos at the time of accretion, $M_\textrm{acc}$, which is tabulated based on different definitions of mass in publicly available catalogs for Bolshoi and Millennium. In catalogs available for Millennium, $M_\textrm{acc}$ is defined as the mass enclosed in a radius around a halo which contains a density of 200 times the critical density of the universe, whereas in the catalogs derived from the Bolshoi simulation, $M_\textrm{acc}$ is the mass enclosed in a radius that contains the virial density as defined in [[[cite Bryan and Norman 1998]]]. We use the publicly available catalog from the Millennium simulation announced by \cite{millannounce}.


We use the prescription in the appendix of [[[cite hu and kravtsov 2003]]] to convert $M_\textrm{vir}$ to $M_{200}$. The success of this prescription can be seen in Fig. \ref{massrat}, which compares $M_{200}$ taken directly from ROCKSTAR to $M_{200}$ calculated based on $M_\textrm{vir}$ from ROCKSTAR. The conversion prescription works well for halos larger than $2 \times 10^9 M_\odot$, which is smaller than any halo corresponding to galaxies observed by our PRIMUS data. This allows us to directly compare the results of our analysis from Millennium and Bolshoi.

\begin{figure}
\includegraphics[width=0.5\textwidth]{massrat}
\caption{The ratio of $M_\textrm{200}$ calculated based on $M_\textrm{vir}$ calculated in ROCKSTAR to $M_\textrm{200}$ calculated in ROCKSTAR for halos in Bolshoi. The thick black line represents the median ratio at a particular ROCKSTAR $M_\textrm{200}$, and the dark and light blue regions represent 68\% and 95\% confidence intervals, respectively, at a particular value on the x axis. The horizontal blue dotted line at 1.0 is for reference and represents an exact match between the two values. The conversion prescription works well for halos larger than about $2 \times 10^9 M_\odot$.}
\label{massrat}
\end{figure}

Our results for Millennium match much more closely with those found by \cite{moster10}, suggesting that most of the difference is due to the difference in cosmology between Bolshoi and Millennium. Table \ref{millennium} shows a comparison of parameters derived with different data sets. Note that in this cosmology, $\gamma$ can be negative, which means that the proportion of matter held in stars can be monotonically increasing, although this is not found to be the most likely scenario. When we repeat the study with both Millennium and SDSS data, without the part of the model that assigns color, our results are consistent with theirs. We discuss this discrepancy further in section \ref{sec:discussion}. 

%It is worth noting that the values found for the first four parameters ($M_1$, $N$, $\beta$, and $\gamma$) differ significantly from those found in \cite{moster10}. However, they use the Millennium suite of simulations and SDSS data, and we have used Bolshoi and PRIMUS. Repeating this study with Millennium gives results that are close to being consistent with theirs, suggesting that most of the difference is due to the difference in cosmology between Bolshoi and Millennium. Table \ref{millennium} shows a comparison of parameters derived with different data sets. Note that in this cosmology, $\gamma$ can be negative, which means that the proportion of matter held in stars can be monotonically increasing, although this is not found to be the most likely scenario. When we repeat the study with both Millennium and SDSS data, without the part of the model that assigns color, our results are consistent with theirs. We discuss this discrepancy further in section \ref{sec:discussion}. 


%----------------------------------------------------------------------------------------------------------------------------
\begin{table*}
\centering
\begin{tabular}{ r c c c c c c}
\hline
\hline
parameter & $N$ & $M_1$ & $\beta$ & $\gamma$ & $p_\mathrm{M}$ & $p_\mathrm{c}$ \\
\hline
mean value & 0.124 & 10.846 & 2.260 & -0.005 & 10.500 & 0.945 \\
68\% CI & [0.083,0.117] & [10.739,10.949] & [1.965,2.535] & [-0.278,0.251] & [10.475,10.533] & [0.841,1.052] \\
95\% CI & [0.045,0.157] & [10.514,11.084] & [1.684,3.342] & [-0.860,0.473] & [10.366,10.569] & [0.666,1.318] \\
\hline
\end{tabular}
\caption{The maximum likelihood values for the six model parameters and 95\% confidence interval, according to the posterior of our MCMC. 
\textcolor{red}{}}
\label{maxlik}
\end{table*}
%--------------------------------------------------------------------------------------------------------------------------------

%--------------------------------------------------------------------------------------------------------------------------------
\begin{figure*}
\includegraphics[width=0.8\textwidth]{triangle}
\caption{Posterior probability distribution for the six parameters in our model. The blue horizontal and vertical lines with a point at the intersection represent one of the samples with the highest likelihood, $\chi^2 = 46.4$. 
\textcolor{red}{}}
\label{triangle}
\end{figure*}
%--------------------------------------------------------------------------------------------------------------------------------

%--------------------------------------------------------------------------------------------------------------------------------
\begin{figure}
\includegraphics[width=0.5\textwidth]{SHM}
\caption{The inferred stellar-to-halo mass relationship. The thick green line is the best fit; the thin blue lines represent alternate models that are within a 1$\sigma$ deviation from the best fit, chosen at random. The dotted lines represent models that are at least a 1$\sigma$ deviation from the best fit but no more than a 2$\sigma$ deviation. }
\label{SHM}
\end{figure}
%--------------------------------------------------------------------------------------------------------------------------------

\begin{figure}
\includegraphics[width=0.5\textwidth]{Pb}
\caption{The inferred blue fraction as a function of halo mass, plotted in the same way as Fig. \ref{SHM}. \textcolor{red}{annotation?}}
\label{Pb}
\end{figure}

\begin{figure*}
\begin{center}
\includegraphics[width=0.9\textwidth]{SMF_color}
%\includegraphics[width=0.8\textwidth]{SMF_blue}
\end{center}
\caption{Above: The red stellar mass function predicted by the maximum likelihood model. The points with error bars represent the PRIMUS data used to constrain our model. The thick black line represents the best fit model - the thin red lines represent alternate models, chosen at random, that are less than a 1$\sigma$ deviation from the maximum likelihood. The dashed lines represent a deviation from the maximum likelihood of at least 1$\sigma$ but no more than 2$\sigma$. Below: The blue stellar mass function predictions, plotted in the same way. \textcolor{red}{}}
\label{SMF}
\end{figure*}

\begin{figure*}
\begin{center}
\includegraphics[width=0.9\textwidth]{SMF_total}
\end{center}
\caption{The overall stellar mass function predicted by the maximum likelihood model, plotted in the same way as Fig. \ref{SMF}. The points with error bars are the sums of red and blue data from PRIMUS. These sums were not used in our calculations but are shown here for reference. \textcolor{red}{color?}}
\label{totSMF}
\end{figure*}

\begin{figure*}
\begin{center}
\includegraphics[width=0.9\textwidth]{corr}
\end{center}
\caption{This correlation function plot is a placeholder, and requires a number of additions and aesthetic improvements. The dotted line refers to APH's age-matching results.}
\label{correlation}
\end{figure*}


\section{Discussion}
\label{sec:discussion}


We have presented a color analysis, depending only on halo mass, of the galaxy-halo connection. The question of when and where star formation quenching happens is one of the most important active research questions in the field of galaxy formation, and this study is an important step towards answering that question. We have shown that a model in which stellar mass and color depend only on the host halo mass and no other halo or environment property can accurately reproduce the observed stellar mass function for both active and passive galaxies, and/but can/not reproduce the observed three-dimensional clustering of both active and passive galaxies. \textcolor{red}{The last part of the last sentence needs a lot more nuance, but in large part we will need to wait for the clustering issues to be resolved. I'll feel a little more comfortable writing the rest of this paragraph then.} If this model correctly assigns galaxies to halos, we will be able to leverage this model to understand the epochs, environments, and halos in which quenching happens.

Our model gives a simple, straightforward prescription for predicting the the probability that a given halo will host an active or passive galaxy, based only on the mass of the halo. This method can easily be extended to other redshifts to give a similarly simple prescription. Having a handy prescription such as this will benefit future galaxy-halo modeling efforts. This model significantly improves on previous attempts to construct similar recipes, in that it is much simpler and in that our entire model depends on only significantly fewer adjustable fitted parameters without sacrificing much in modeling precision.

%----------------------------------------------------------------------------------------------------------------------------
\begin{table*}
\centering
\begin{tabular}{ r c c c c c c}
\hline
\hline
parameter & $N$ & $M_1$ & $\beta$ & $\gamma$ & $p_\mathrm{M}$ & $p_\mathrm{c}$ \\
\hline
Bolshoi ($M_\textrm{vir}$) & $0.018^{+0.003}_{-0.003}$ & $11.36^{+0.06}_{-0.09}$ & $2.8^{+0.4}_{-0.3}$ & $-0.19^{+0.16}_{-0.27}$ & $11.14^{+0.02}_{-0.03}$ & $0.97^{+0.10}_{-0.08}$ \\
Bolshoi ($M_{200}$) & $0.018^{+0.008}_{-0.003}$ & $11.39^{+0.16}_{-0.08}$ & $2.8^{+0.4}_{-0.6}$ & $-0.26^{+0.21}_{-0.51}$ & $11.16^{+0.02}_{-0.07}$ & $0.98^{+0.11}_{-0.17}$ \\
Millennium & $0.027^{+0.001}_{-0.003}$ & $11.73^{+0.06}_{-0.12}$ & $1.4^{+0.1}_{-0.1}$ & $0.55^{+0.08}_{-0.18}$ & $11.16^{+0.03}_{-0.03}$ & $0.78^{+0.07}_{-0.06}$ \\
Moster et al. 2010 & $0.02817^{+0.00063}_{-0.00057}$ & $11.899^{+0.026}_{-0.024}$ & $1.068^{+0.051}_{-0.044}$ & $0.611^{+0.012}_{-0.010}$ & - & - \\
 \\
\hline
\end{tabular}
\caption{Comparison of median parameter values with 68\% confidence intervals for Bolshoi vs. Millennium. The third row shows the best fit and 1$\sigma$ confidence intervals derived by Moster et al. 2010. \textcolor{red}{Need to add my own millennium/sdss results}.
\textcolor{red}{}}
\label{millennium}
\end{table*}
%--------------------------------------------------------------------------------------------------------------------------------

In Table \ref{millennium}, we show a comparison of the parameter values derived when using Bolshoi and Millennium halo catalogs. In the third row we show results derived by Moster et. al 2010, which used Millennium and SDSS data (and did not include color analysis). As can be seen, using SDSS SMFs has an effect on parameter values, but it is much smaller than the affect of halo catalog choice. This strongly suggests that the difference in cosmology assumed between Bolshoi and Millennium is big enough to drastically change the galaxy-halo connection.

In particular, the $\gamma$ value, when constrained using Bolshoi, can be less than zero. This means that the proportion of matter held in stars can be monotonically increasing with stellar mass, as can be seen in Fig. \ref{SHM}.

%mention extending to other redshifts.



\section{Acknowledgements}

The Millennium Simulation databases used in this paper and the web application providing online access to them were constructed as part of the activities of the German Astrophysical Virtual Observatory (GAVO).








\bibliographystyle{plainnat}
\bibliography{N-body,AM,galaxyform,hydro,sam,baryonMh,galaxybi,quenching}



\end{document}


